<extend name="User:add"/>

<block name="title">
    <title>导航菜单列表</title>
</block>

<block name="con">

    <div class="mws-panel grid_8">
        <div class="mws-panel-header">
            <span><i class="icon-table"></i>导航菜单列表</span>
        </div>
        <div class="mws-panel-body no-padding">
            <div role="grid" class="dataTables_wrapper" id="DataTables_Table_1_wrapper">
                <div id="DataTables_Table_1_length" class="dataTables_length"><label>显示 <select
                        name="DataTables_Table_1_length" size="1" aria-controls="DataTables_Table_1">

                    <option value="10"
                    <eq name="num" value="10">selected ="selected"</eq>
                    >10</option>

                    <option value="25"
                    <eq name="num" value="25">selected ="selected"</eq>
                    >25</option>

                    <option value="50"
                    <eq name="num" value="50">selected ="selected"</eq>
                    >50</option>
                    <option value="100"
                    <eq name="num" value="100">selected ="selected"</eq>
                    >100</option></select> 条数据</label></div>
                <div class="dataTables_filter" id="DataTables_Table_1_filter"><label>Search: <input type="text"
                                                                                                    aria-controls="DataTables_Table_1"></label>
                </div>
                <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1"
                       aria-describedby="DataTables_Table_1_info">
                    <thead>
                    <tr role="row">
                        <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1"
                            rowspan="1" colspan="1" style="width: 60px;" aria-sort="ascending"
                            aria-label="Rendering engine: activate to sort column descending">菜单ID
                        </th>
                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1"
                            rowspan="1" colspan="1" style="width: 60px;"
                            aria-label="Browser: activate to sort column ascending">菜单标题
                        </th>
                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1"
                            rowspan="1" colspan="1" style="width: 60px;"
                            aria-label="Platform(s): activate to sort column ascending">菜单路径
                        </th>
                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1"
                            rowspan="1" colspan="1" style="width: 60px;"
                            aria-label="Engine version: activate to sort column ascending">父级菜单
                        </th>
                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1"
                            rowspan="1" colspan="1" style="width: 87px;"
                            aria-label="CSS grade: activate to sort column ascending">url地址
                        </th>
                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1"
                            rowspan="1" colspan="1" style="width: 87px;"
                            aria-label="CSS grade: activate to sort column ascending">菜单位置
                        </th>
                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1"
                            rowspan="1" colspan="1" style="width: 87px;"
                            aria-label="CSS grade: activate to sort column ascending">操作
                        </th>

                    </thead>

                    <tbody role="alert" aria-live="polite" aria-relevant="all">
                    <foreach name="navs" item="vo">

                        <tr class="<?php echo $key%2==0 ? " odd
                        " :"even"; ?>">

                        <td class="">{$vo['id']}</td>
                        <td class=" ">{$vo['title']}</td>
                        <td class="">{$vo['path']}</td>
                        <td class="">{$vo['pid']|getNavName}</td>
                        <td class=" ">{$vo['url']}</td>
                        <td class=" ">{$nav[$vo['position']]}</td>

                        <td>
                            <a class="btn btn-small" href="{:U('Nav/edit',array('id'=>$vo['id']))}"><i
                                    class="icon-pencil"></i></a>
                            <a class="btn btn-small" href="{:U('Nav/delete',array('id'=>$vo['id']))}"><i
                                    class="icon-trash"></i></a></td>
                        </tr>
                    </foreach>


                    </tbody>
                </table>

                <style type="text/css">
                    #DataTables_Table_1_paginate a, #DataTables_Table_1_paginate span {
                        display: block;
                        float: left;
                        margin-right: 40px;
                        font-size: 16px;
                    }
                </style>
                <div class="dataTables_paginate paging_full_numbers" id="DataTables_Table_1_paginate">
                    {$page}
                </div>
            </div>
        </div>
    </div>

</block>